import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'login',
    component: () =>
        import ('../views/Login.vue')
}, {
    path: '/home',
    name: 'Home',
    component: () =>
        import ('../views/Home.vue'),
    children: [
        //首页
        {
            path: 'homepage',
            name:'home/homepage',
            component: () =>
                import ('../views/Home/homePage.vue'),
        },
        {
            // 部门管理
            path: 'base/department',
            component: () =>
                import ('../views/jiChuDangAn--QR/Department.vue'),
        },
        {
            // 员工管理
            path: 'base/personnel',
            component: () =>
                import ('../views/jiChuDangAn--QR/Personnel.vue'),
        },
        {
            // 角色管理
            path: 'base/role',
            component: () =>
                import ('../views/jiChuDangAn--QR/Role.vue'),
        },
        {
            // 费用标准
            path: 'base/cost',
            name: 'Cost',
            component: () =>
                import ('../views/jiChuDangAn--QR/Cost.vue'),
        },
        {
            path: 'members/huiyuanguanli',
            component: () =>
                import ('../views/Floor--HYH/huiyuanguanli.vue') // 会员管理
        },
        {
            path: 'members/huiyuanshenhe',
            component: () =>
                import ('../views/Floor--HYH/huiyuanshenhe.vue') // 会员审核
        },
        {
            path: 'floor/loudongguanli',
            component: () =>
                import ('../views/Floor--HYH/loudongguanli.vue') // 楼栋管理
        },
        {
            path: 'repair/yezhubaoxiu',
            component: () =>
                import ('../views/Floor--HYH/yezhubaoxiu.vue') // 业主报修
        },
        {
            path: 'lease/zulinhetong',
            component: () =>
                import ('../views/Floor--HYH/zulinhetong.vue') // 租赁合同
        },
        {
            path: 'charges/property',
            name: "property",
            component: () =>
                import ('../views/Charges/Property.vue') //物业费
        },
        {
            path: 'charges/deposit',
            name: "deposit",
            component: () =>
                import ('../views/Charges/Deposit.vue') //押金
        },
        {
            path: 'charges/leasing',
            name: "leasing",
            component: () =>
                import ('../views/Charges/Leasing.vue') //租聘
        },
        {
            path: 'charges/utilities',
            name: "utilities",
            component: () =>
                import ('../views/Charges/Utilities.vue') //水电气
        },
        //财务管理-收款流水
        {
            path: 'financial/shoukuan',
            name: 'Shoukuan',
            component: () =>
                import ('../views/Caiwuguanli/shoukuanliushui.vue'),
        },
        //财务管理-付款流水
        {
            path: 'financial/fukuan',
            name: 'Fukuan',
            component: () =>
                import ('../views/Caiwuguanli/fukuanliushui.vue'),
        },

        //个人中心-我的信息
        {
            path: 'center/myinformation',
            component: () =>
                import ('../views/Personalcenter/Myinformation.vue')
        },
        //个人中心-修改密码
        {
            path: 'center/password',
            component: () =>
                import ('../views/Personalcenter/password.vue')
        }
    ]
}, ]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router 